<?php

class mdl_t_status_surat_masuk extends CI_Model{

	function __construct(){
		parent::__construct();
	}



	function insert($data){
		$this->db->flush_cache();
		$this->db->set('id_surat', $data['id_surat']);
		$this->db->set('level', $data['level']);
		$this->db->set('kd_unit', $data['kd_unit']);
		$this->db->set('userid', $data['userid']);
		$this->db->set('status', $data['status']);
		$this->db->set('keterangan', $data['keterangan']);
		$this->db->set('file', $data['file']);
		$result = $this->db->insert('t_status_surat_masuk');

		if($result) {
			return TRUE;
		}else {
			return FALSE;
		}

	}


	function update($data){
		$this->db->flush_cache();
		$this->db->set('status', $data['status']);
		$this->db->where('id', $data['id_surat']);
		$result = $this->db->update('t_status_surat_masuk');

		if($result) {
			return TRUE;
		}else {
			return FALSE;
		}

	}



}